import { GTileList } from "../../../../../com/mui/controls/GTileList";
import { ScrollBarDirection } from "../../../../../fl/controls/ScrollBarDirection";
import { GoodRender } from "./GoodRender";
import { DataProvider } from "../../../../../fl/data/DataProvider";
//class GoodListPanel
    
    export  class GoodListPanel extends GTileList
    {
        constructor()
        {
            super();
            this.mouseChildren = true;
            this.initTile();
            return;
        }

        /* internal  */initTile(): void
        {
            this.setSize(615, 360);
            this.columnWidth = 197;
            this.rowHeight = 100;
            this.direction = ScrollBarDirection.VERTICAL;
            this.horizontalGap = 8;
            this.verticalGap = 8;
            this.setStyle("skin", new Object /* flash.display.Bitmap */());
            this.setStyle("cellRenderer", GoodRender);
            return;
        }

        public updateDataProvider(arg1: Array<any>): void
        {
            var loc1=0;
            if (arg1 && arg1.length > 0) 
            {
                dataProvider.removeAll();
                loc1 = 0;
                while (loc1 < arg1.length) 
                {
                    dataProvider.addItem(arg1[loc1]);
                    ++loc1;
                }
                this.dataProvider = dataProvider;
            }
            else 
            {
                this.dataProvider = new DataProvider();
            }
            return;
        }

        /* internal */ /* var */_bg: Object /* flash.display.Bitmap */;
    }
